<?php
if(!defined('IN_BSTO')){ die('[ERROR] You cannot load this page directly !!!'); }

Class PrivacyController Extends BaseController {

    public function index() {
        
        //$db = new DB();
        $privacy = array_pop($this->registry->db->get('staticManager')->getPrivacy());
        
        $leftContent = '';

		//echo $aboutUs->get('value');
		if ($privacy->get('value') == 'Default Page') {						
			$title = 'Default Page';	
			$picTag = ' ';		
		} else {
			$title = 'Privacy';
			$picTag = '<center><img src="'.BSTO_ROOT_PATH.'views/images/about.gif" alt="" title="" class="right"/></center> ';		
		}
                        
        $leftContent = '';
        $leftContent .= '
            <div class="title"><span class="title_icon"><img src="'.BSTO_ROOT_PATH.'views/images/bullet1.gif" alt="" title="" /></span>' . $title . '</div>
        
        	<div class="feat_prod_box_details">
            ' . $picTag;            
        
        $leftContent .= $privacy->get('detail');
        $leftContent .= '</div> ' ;
        $tags = array('bstoHead'=>"");
   		$user = $this->registry->db->get('userManager')->getCurrentUser();
        if($user != null){
        	$tags['login'] = '<li id="login"><span> Hello, '. $user->get('username').'</span><a href="{bstoRootPath}logout">Logout</a></li>';	
        }else{
        	$tags['login'] = '<li id="login"><a href="{bstoRootPath}login">Login</a></li>';
        }
        $output = $this->registry->template->getPageContent('index', 'Privacy Policy', $leftContent , $tags);
        
        echo $output;      
    }

}
?>